How to use templates:
Templates for the Gallery Wizard are normal HTML pages that contain a bunch of special code. A template should always contain a block which defines the options used to create the gallery page. The position of this block also defines where the created thumbnail table is inserted. Don't worry, none of this code will be visible in the generated pages.
Additionally, the template may contain several variables, which are explained on the variables page. It may also be advised to copy files from the "templates\" directory (found in Gallery Wizard installation directory) to the destination directory. This is, for example, useful for including background images in the output. The list of files to be copied must be specifed in the template in a block like this, with one line for each file:
<!--COPYSTART
file1
file2
file3
COPYEND-->
Note that the gallery code must only contain line breaks after each definition. You may use most variables in them. For examples of gallery code, check the templates that came with the program - "default.htm" is a nice start for new templates. The Gallerycode itself is in a HTML Comment block, all variables are embraced in <%..%> blocks, which most of you might, for example, know from Java Server Pages. Therefore, in case the gallery page is going to be compiled, it is very important that you parse the page before you try to compile it.
Template Code Reference:
Template Code | Explanation | Example |
---|---|---|
<!--BEGIN GALLERYCODE | This tells the program's parser that the option block starts here. Also defines where the actual gallery code is inserted in the page. | |
TABLEBEGIN:= | This defines the HTML code that is inserted at the start of the table.Should usually contain a <table> tag. | TABLEBEGIN:=<TABLE ALIGN=CENTER> |
TABLEEND:= | The code for the end of the table. Usually just </table>. | TABLEEND:=</TABLE> |
COLUMNBEGIN:= | This code is inserted for each table cell, before each image. | COLUMNBEGIN:=<TD ALIGN=CENTER> |
COLUMNEND:= | This code is inserted after each table cell/ image. | COLUMNEND:=</TD> |
ROWBEGIN:= | ROWBEGIN:=<TR> | |
ROWEND:= | ROWEND:=</TR> | |
IMAGEBEGIN:= | This starts the <IMG> tag. The name of the concrete thumbnail will be inserted after it, followed by the IMAGEEND option. | IMAGEBEGIN:=<IMG SRC=" |
IMAGEEND:= | This is the end of the <IMG> tag. may contain several variables that are valid only for each image, like <%IMAGENAME%>. | IMAGEEND:=" ALT="<%IMAGENAME%>" BORDER=0> |
LINKBEGIN:= | The start of the link to the actual image. | LINKBEGIN:=<A HREF=" |
LINKEND:= | The end for the link tag. Note that this should not be </A>, is that is inserted automatically after the thumbnail code. | LINKEND:= " TARGET="otherframe"> |
NAVIGATIONBEGIN:= | The first line of code for the gallery navigation. Will only be inserted if more than one page is generated. | NAVIGATIONBEGIN:=Page <%PAGE%> of <%PAGEMAX%><BR> |
NAVIGATIONEND:= | The second line for the gallery navigation. Will only be inserted if more than one page is generated. | NAVIGATIONEND:=<%PREVIOUS%>Previous</A> | <%NEXT%>Next</A> |
END GALLERYCODE--> | This ends the options block and defines where the gallery table ends. |